﻿<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>用户列表</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<link rel="stylesheet" th:href="@{/css/style.css}" type="text/css"/>
<link rel="stylesheet" th:href="@{/css/main.css}" type="text/css"/>
<body>
<div id="main">
    <div class="">
        <input type="button" value="添加" class="input_button3" onClick="add()"/>
    </div>
    <div class="sort_switch">
        <ul id="TabsNav">
            <li class="selected"><a href="#">用户</a></li>
        </ul>
    </div>
    <div class="sort_content">
        <table class="tableHue1" width="100%" border="1" bordercolor="#a4d5e3" cellspacing="0" cellpadding="0">
            <thead>
            <tr>
                <td width="30%"><strong>姓名</strong></td>
                <td width="10%"><strong>年龄</strong></td>
                <td width="50%"><strong>所属用户组</strong></td>
                <td width="10%"><strong>操作</strong></td>
            </tr>
            </thead>
            <tbody id="tbody">
            <tr th:each="user : ${users}">
                <td th:text="${user.lastName}"></td>
                <td th:text="${user.age}"></td>
                <td th:text="${user.groupName}"></td>
                <td><a href="#" th:href="@{/user/deleteUser(userId=${user.userId})}">删除</a></td>
            </tr>
            </tbody>
        </table>
    </div>


</div>

</body>

<script>
    function add() {
        window.location.href = "/user/toAddUser";
    }
</script>

</html>
